package com.appbee.news.client;

import javax.inject.Inject;
import javax.inject.Singleton;

import com.appbee.core.client.modular.IModulRegistry;
import com.appbee.core.client.modular.impl.ActivityModul;
import com.appbee.news.client.activty.NewsActivty;
import com.google.gwt.inject.client.AsyncProvider;

@Singleton
public class NewsActivityModul extends ActivityModul
{
	private static final String NEWS = "news";
	private final IModulRegistry registry;

	@Inject
	public NewsActivityModul(	AsyncProvider<NewsActivty> newsProvider,
								IModulRegistry registry)
	{
		setDefaultActivty(newsProvider);
		this.registry = registry;
	}

	public void register()
	{
		registry.register(NEWS, this);
	}

	@Override
	public String getName()
	{
		return "News";
	}

	@Override
	public String getId()
	{
		return NEWS;
	}

}
